﻿cls
write-host "This script will merge all the help files into a master help file which PS can understand"
pwd

return; #Not creating MAML help files for now. This requires more far more efforts than what I had imagined
$helpcontentmaster=get-content .\SpWebShell.dll-Help-Template.xml
$results=".\SpWebShell.dll-Help.xml"
$retval=Test-Path -Path $results
if ($retval)
    {
    Remove-Item -Path $results
    }

foreach ($line in $helpcontentmaster) 
    { 
    $newline="";
    if ($line.IndexOf(".help.xml") -ge 0)
        {
        $token=$line.Trim();
        Write-Host "found match:$token"
        $filecontent=get-content  $token.Trim()
        $newline=$filecontent
        }
    else
        {
        $newline=$line
        }
    $newline | Out-File -FilePath $results -Append -encoding utf8

    }